using System;
using System.Collections.Generic;
using System.Text;

namespace Core.Model
{
    public class Player
    {
        private readonly string _playerName;

        public Player(string playerName)
        {
            if (playerName == null) throw new ArgumentNullException("playerName");
            _playerName = playerName;
        }

        public override bool Equals(object obj)
        {
            if (obj == null) throw new NullReferenceException();
                Player player = (Player)obj;
                return _playerName.Equals(player._playerName);
        }

        public override int GetHashCode()
        {
            return _playerName.GetHashCode();
        }

        public string PlayerName
        {
            get { return _playerName; }
        }
    }
}
